package com.luck.pf.common.entity;

import java.util.List;

import com.luck.org.entity.VDepartment;
import com.luck.org.entity.VUser;


public class UserBean {
	private Long userId;//用户表主键	
	private String loginName;//登录账号
	private Long deptId;//用户所属部门id
	private VDepartment dept;//部门
	private VDepartment org;//机构
	private Long orgId;//机构id
	private VUser user;

	/**
	 * 业务资源权限列表
	 */
    private List resources;
	
	/**
	 * 查找业务权限是否在列表中
	 * @param resId
	 * @return
	 */
	public boolean findResource(String id){
		if(resources == null || resources.isEmpty())
			return false;
		if(resources.contains(id))
			return true;
		return false;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}


	public String getLoginName() {
		return loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	public Long getDeptId() {
		return deptId;
	}

	public void setDeptId(Long deptId) {
		this.deptId = deptId;
	}

	public VDepartment getDept() {
		return dept;
	}

	public void setDept(VDepartment dept) {
		this.dept = dept;
	}

	public VUser getUser() {
		return user;
	}

	public void setUser(VUser user) {
		this.user = user;
	}

	public List getResources() {
		return resources;
	}

	public void setResources(List resources) {
		this.resources = resources;
	}

	public VDepartment getOrg() {
		return org;
	}

	public void setOrg(VDepartment org) {
		this.org = org;
	}

	public Long getOrgId() {
		return orgId;
	}

	public void setOrgId(Long orgId) {
		this.orgId = orgId;
	}

}
